package cn.xeblog.forward.conmmon;

import cn.hutool.core.util.StrUtil;
import cn.xeblog.forward.codec.MessageSerializer;
import cn.xeblog.forward.utils.YamlUtil;

/**
 * @author eleven
 * @date 2024/12/16 10:49
 * @apiNote
 */
public class Config {
    public static MessageSerializer.Algorithm getSerializerAlgorithm() {
        String property = String.valueOf(YamlUtil.getValue("serializer.algorithm"));
        if (StrUtil.isBlank(property)) {
            return MessageSerializer.Algorithm.JAVA;
        }
        return MessageSerializer.Algorithm.valueOf(property);
    }
}
